home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.697 < prev    next >
Text File  |  1992-02-06  |  6KB  |  119 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  2. \paperw12300
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\f0\b0\i0\ul0\fs28\fc0 nikit netinfo\
  8. \
  9. Q: I read the release notes about the NIKit on 2.0. Is there any other information about these objects and how to use them? \
  10. \
  11. A: The only documentation that we currently have available are the release notes on-line on 2.0 and whatever you can glean from the .h files.  As you saw from those notes, it gives you a rough overview of the objects available in the NIKit, but doesn't give you any reference material. Through this NeXTAnswer, we hope to shed some light on the  NIKIT objects, how to use them, and for what purpose.\
  12. \
  13. Feedback for these objects would be greatly appreciated by the folks in software. Please send your feedback to bug_next@next.com.\
  14. \
  15.  
  16. \b NIDomain object
  17. \b0 \
  18. The first object, the NIDomain object, was created so that the other objects could have something through which to communicate to the NIKIT database.  The panel objects (like NIOpenPanel) use NIDomain to set and retrieve data from the NI database.  This object is the most likely one to change in future releases. You will probably not use NIDomain directly in your application, since the panel objects provide a higher level interface to it.\
  19. \
  20.  
  21. \b NIDomainPanel Object
  22. \b0 \
  23. The NIDomainPanel object is essentially a browser. It browses through the domain hierarchy, and displays it (much like the file system browser). To use the NIDomainPanel you should follow these steps:\
  24. \
  25.     - 
  26. \b new
  27. \b0  \
  28.         returns an id for the new instance of the NIDomainPanel.\
  29.     - 
  30. \b runModal
  31. \b0 \
  32.         this runs a modal loop which exits when the user presses ok or cancel\
  33.     - 
  34. \b exitFlags
  35. \b0 \
  36.         returns whether the user pressed ok or cancel\
  37.     - 
  38. \b domain
  39. \b0 \
  40.         returns the name of the domain that the user has selected.\
  41.     \
  42. The other methods are primarily there in case you wish to override them and provide some special functionality. Most useful are 
  43. \b cancel
  44. \b0 , 
  45. \b ok
  46. \b0  and 
  47. \b domain
  48. \b0 .\
  49. \
  50.  
  51. \b NIOpenPanel Object
  52. \b0 \
  53. The next object, NIOpenPanel is a sub class of NIDomainPanel. It is used to display and select a particular directory from a list of its peers inside of any NetInfo domain in the heirarchy. It's analagous to the OpenPanel for filesystems. NIOpenPanel consists of the domain browser (which it inherits from the NIDomainPanel), buttons and a scrolling list of directories. You create an NIOpenPanel the same way in which you create a NIDomainPanel: using 
  54. \b new
  55. \b0  and 
  56. \b runModal
  57. \b0 .  The other really interesting methods in NIOpenPanel are the 
  58. \b directory
  59. \b0  and 
  60. \b setDirectoryPath
  61. \b0  methods which you can use to programmatically browse to the to the directory path that you want from inside of the domains, or ask the NIOpenPanel where it currently is browsed to.\
  62. \
  63.  
  64. \b NISavePanel Object
  65. \b0 \
  66. NISavePanel is a subclass of NIOpenPanel, and is used to assist in saving changes to an open directory in a particular domain. NISavePanel is very much like NIOpenPanel, but with some additional functionality.  It provides three different 
  67. \b runModal
  68. \b0  routines. 
  69. \b runModal
  70. \b0  is the one which you will use most frequently. It will start such that the browser is displaying your current domain. 
  71. \b runModalWithString
  72. \b0  runs a modal loop, and starts up such that the browser is displaying the domain which is passed in through "initialValue". 
  73. \b runModalwithUneditableString
  74. \b0  is the same except for the fact that the directory is uneditable. It is used this way inside the NetManager and UserManager where the name of the directory is a fundamental property of the machine or user being edited and cannot be changed on the fly while performing a Save To.\
  75. \
  76. \
  77.  
  78. \b NILoginPanel Object
  79. \b0 \
  80. And finally the NILoginPanel. This is probably the object for which you will have the most use. The login panel is used to verify (authenticate) a user's identification. You can either rely on the user id and password that are stored in the NI database, or you can use your own. There are three 
  81. \b runModal
  82. \b0  methods in this object as well:\
  83.  
  84. \b     - (BOOL)runModal:sender inDomain:(void *) domainID;\
  85.  
  86. \b0     This runs the login dialog modally with the default user "root".\
  87.         \
  88.  
  89. \b     - (BOOL)runModal:sender withUser:(char *)userName inDomain:(void *)domainID\
  90.         withString:(const char *)whatWarning allowChange:(BOOL)disableUser;\
  91.  
  92. \b0     This runs the login dialog modally with the user as specified. You can change the message\
  93.     displayed on the panel by using the withString argument. Also, this method allows the user to\
  94.     edit the default user name.\
  95.         \
  96.  
  97. \b     - (BOOL)runModalwithValidation:sender withUser:(const char *)userName\
  98.         inDomain:(void *) domainID withString:(const char *)whatWarning\
  99.         allowChange:(BOOL)enableUser;\
  100.  
  101. \b0     This runs the login dialog modally as the previous method. However, this one requires validation.\
  102.     With this modal method you can provide your own password validation scheme. You use this\
  103.     in conjunction with the NILoginPanelDelegate's 
  104. \b authenticateUser
  105. \b0  method.\
  106.     \
  107. At this point there is no example code from which you can learn to use these objects wisely (or at all). For examples about how these NIKIT objects look and for an idea of how they can be put to good use, you can look at the sysadmin tools in /NextAdmin.  Most of them use the NIKit.   Future changes in the NIKit will be made to better support these applications.\
  108. \
  109. One thing to remember about the NIKit. It is currently in a prelimanary state. Some features have not been implemented, and there are some rough edges. The NIKit is subject to change and may behave unpredictably. We recommend that you do not use these objects in shipping products at this time.\
  110. \
  111.  
  112. QA697\
  113. \
  114. Not Valid for 1.0\
  115. Valid for 2.0 \
  116. \
  117.  
  118.  
  119.